File yast2-installation-usbfix.spec of Package yast2-installation-usbfix

Name:           yast2-installation-usbfix
Version:	1.0
Release:	3
License:	GPL-2.0
Summary:	Startup script for fixing USB flash drive issues with YaST Second Stage
Group:		System/Utilities
Source0:	F01-savedeviceuuid
Source1:	S01-changedevices
BuildRequires:	yast2-installation
Requires:	yast2-installation
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:	noarch

There are discrepancies between the /dev/disk/by-id name used during installation and during the second stage.
Some flash drives will identify themselves as "scsi-..." during the installation, and "usb-..." on second stage, 
causing repository errors.

This package adds a finish script to be run AFTER YaST's first stage saving the device path, and another one
as a startup script to be run BEFORE YaST's second stage, fixing the device name in .repo files to the "new" device name.


mkdir -p ${RPM_BUILD_ROOT}/usr/lib/YaST2/startup/First-Stage/
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/YaST2/startup/Second-Stage/
install -m 0755 %{S:0} ${RPM_BUILD_ROOT}/usr/lib/YaST2/startup/First-Stage/.
install -m 0755 %{S:1} ${RPM_BUILD_ROOT}/usr/lib/YaST2/startup/Second-Stage/.


* Wed Feb 22 2017 Erico Mendonca <>
+ Using udev output format for blkid, as some devices invert the LABEL and UUID fields.

* Fri Feb 17 2017 Erico Mendonca <>
+ Changing approach to /dev/disk/by-uuid.

* Thu Feb 16 2017 Erico Mendonca <>
+ initial version.