diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | conf/14.2-15.0.repl | 10 | ||||
-rw-r--r-- | slackupgrade | 40 |
4 files changed, 49 insertions, 15 deletions
@@ -13,19 +13,19 @@ # # You should have received a copy of the GNU General Public License # along with slackupgrade. If not, see # <http://www.gnu.org/licenses/>. PACKAGE = slackupgrade -VERSION = 2.1 +VERSION = 2.3 SBINDIR = /sbin MANDIR = /usr/man MAN8DIR = $(MANDIR)/man8 CONFDIR = /etc/$(PACKAGE) -CONFFILES = conf/14.0-14.1.repl conf/14.1-14.2.repl +CONFFILES = conf/14.0-14.1.repl conf/14.1-14.2.repl conf/14.2-15.0.repl help:; @echo "Avalable targets:" @echo "" @echo "$$ make install" @echo " Installs the program. Influential variables:" @@ -1,11 +1,19 @@ -slackupgrade -- history of user-visible changes. 2020-03-28 +slackupgrade -- history of user-visible changes. 2022-04-30 See the end of file for copying conditions. Please send slackupgrade bug reports to <gray+slackupgrade@gnu.org.ua> +Version 2.3, 2022-04-30 + +* Support for Slackware 15.0 + +Version 2.2, 2020-03-29 + +* Fix the -k option. + Version 2.1, 2020-03-28 * Bugfix in the 14.1-14.2 replacement map. Version 2.0, 2020-02-15 diff --git a/conf/14.2-15.0.repl b/conf/14.2-15.0.repl new file mode 100644 index 0000000..4bb2170 --- /dev/null +++ b/conf/14.2-15.0.repl @@ -0,0 +1,10 @@ +aaa_elflibs aaa_libraries +ash dash +glibc-solibs aaa_glibc-solibs +man man-db +mailx s-nail +python python2 +qt qt5 +slocate mlocate +tetex texlive +openldap-client openldap diff --git a/slackupgrade b/slackupgrade index f00e20b..b7eb5c1 100644 --- a/slackupgrade +++ b/slackupgrade @@ -91,13 +91,14 @@ function tempdir_create() { umask 077 mkdir $tempdir umask $u } function tempdir_remove() { - rm -rf $tempdir $onexit_remove_list + rm -rf $tempdir + dropfile $onexit_remove_list } function usage() { cat <<EOF usage: $0 [-anqvy] [-k FILE] [-s SERIES] [DIRECTORY] Upgrade Slackware installation @@ -162,13 +163,13 @@ function abend() { exit 1 } function package_file_name() { pkg=$(awk -vname=$1 '$1==name { print $2 }' $avail_index) if [ -z "$pkg" ]; then - error "package $name not found in index (should not happen!)" + error "package $1 not found in index (should not happen!)" else echo $pkg fi } # check_package_md5sum PKG ARCHIVE @@ -282,13 +283,13 @@ function getfile() { } # dropfile FILE # Removes FILE, if it has been downloaded from the remote repository, function dropfile() { if [ -n "$remote" ] || [ $strip_series -eq 1 ]; then - rm $1 + rm "$@" fi } # upgrade_package [OPTIONS] FILE # Runs upgradepkg with the supplied arguments and captures its output to # the log file. In verbose mode, filters parts of it to the stdout. @@ -545,13 +546,13 @@ if [ -z "$checksums" ]; then abend "CHECKSUMS.md5 not found in $rooturl" fi onexit_remove $checksums announce=$(tail +13 $checksums | \ sed -n -r\ - -e 's/^[0-9a-fA-F]+[[:space:]]+(\.\/ANNOUNCE\.[[:digit:]_]+)$/\1/p') + -e 's/^[0-9a-fA-F]+[[:space:]]+(\.\/ANNOUNCE\.[[:digit:]_.]+)$/\1/p') if [ -z "$announce" ]; then abend "ANNOUNCE not found in $rooturl" fi file=$(getfile $announce) if [ -z "$file" ]; then abend "file $announce not found in $rooturl" @@ -621,32 +622,32 @@ if [ -n "$keep_file" ] && [ -s "$keep_file" ]; then rm remove.list.$$ else mv remove.list.$$ remove.list fi # Create $remove_report and the list of installation candidates. -if [ -f "$SLACKUPGRADE_CONFDIR/$VERSION-$newversion.repl" ]; then - info "reading $SLACKUPGRADE_CONFDIR/$VERSION-$newversion.repl" +replace_file="$SLACKUPGRADE_CONFDIR/$VERSION-$newversion.repl" +rename_file=rename.list +if [ -f "$replace_file" ]; then + info "reading $replace_file" # Update candidates and save the replacement map in a temporary. awk '{ sub(/#.*$/,""); sub(/[[:space:]]+$/,"") } /\\$/ { sub(/\\$/,""); p = p $0; next } NF == 0 { if (p) print p; p = ""; next } { print p $0; p="" }' \ - $SLACKUPGRADE_CONFDIR/$VERSION-$newversion.repl | \ + $replace_file | \ sort +0 -1 | \ - tee rename.$$ | \ + tee rename.list | \ join - remove.list | \ cut -d ' ' -f 2- | \ tr ' ' '\n' | \ cat - candidates.$$ | \ sort -u > candidates # Use the temporary to remove the original package names from the report. - awk '{print $1}' rename.$$ | \ + awk '{print $1}' rename.list | \ comm -13 - remove.list > $remove_report - # Clean up - rm rename.$$ else cp remove.list $remove_report mv candidates.$$ candidates fi # Disable interrupts during critical section @@ -766,12 +767,16 @@ pkg_names="glibc-solibs pkgtools tar xz findutils" if [ -n "$remote" ]; then # If using the remote repository, add wget and the libraries it # depends on. Wget is preferred over curl because of its limited # number of dependencies. pkg_names="$pkg_names aaa_elflibs wget" fi + +if [ -f $rename_file ]; then + pkg_names=$(echo "$pkg_names" | tr ' ' '\n' | sort | join -j 1 -a 1 - rename.list | cut -d ' ' -f 2- | sort | tr '\n' ' ') +fi pkg_re='^('$(echo "$pkg_names" | sed -r -e 's/ +/|/g')')$' pkg_files= info "downloading essential packages" for pkg in $pkg_names do @@ -781,13 +786,20 @@ do fi onexit_remove $file pkg_files="$pkg_files${pkg_files:+ }$file" done info "installing essential packages" -upgrade_local $pkg_files +for pkg in $pkg_files +do + upgrade_local --install-new $pkg + case $(basename $pkg) in + aaa_*) + ldconfig + esac +done if [ -n "$remote" ]; then # Until now we have been using whatever downloader that is available # (curl or wget). Switch to wget: it has all its dependecies installed. dnfunc=download_wget fi @@ -803,12 +815,16 @@ do s=$(basename ${pkg%/*}) if [ "$prev" != "$s" ]; then info "installing selected files from series $s" prev=$s fi upgrade_package $pkg --install-new + case $(basename $pkg) in + aaa_*) + ldconfig + esac done if [ -s remove.list ]; then info "removing packages" if [ -n "$dry_run" ]; then : |