ports: Avoid using two separate directories for port packages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
919c71ff85
commit
16590dbb02
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,5 +8,4 @@ base/usr/**
|
||||
.fakeroot
|
||||
kernel/config.cmake
|
||||
ports/out/
|
||||
ports/local/
|
||||
ports/temp/
|
||||
|
@ -15,11 +15,6 @@ fi
|
||||
|
||||
source ports/$PORT_NAME/PACKAGE
|
||||
|
||||
if [ -f ports/local/$name-$version.tar.gz ]; then
|
||||
echo "Package $PORT_NAME is already installed and up to date!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -f ports/out/$name-$version.tar.gz ]; then
|
||||
tools/make-package.sh $PORT_NAME
|
||||
fi
|
||||
@ -28,19 +23,17 @@ PORT_FILES=$LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files
|
||||
|
||||
if [ -f $PORT_FILES ]
|
||||
then
|
||||
echo "Package $PORT_NAME is installed, but is an outdated version. Updating."
|
||||
echo "Package $PORT_NAME is already installed! Updating."
|
||||
tools/uninstall-package.sh $PORT_NAME
|
||||
fi
|
||||
|
||||
cp ports/out/$name-$version.tar.gz ports/local/
|
||||
|
||||
mkdir -p $LUNA_BASE/usr/share/pkgdb/
|
||||
|
||||
cd $LUNA_BASE
|
||||
|
||||
find -type f | sed 's|^./||' > /tmp/before.list
|
||||
|
||||
tar -C $LUNA_BASE -xf $LUNA_ROOT/ports/local/$name-$version.tar.gz
|
||||
tar -C $LUNA_BASE -xf $LUNA_ROOT/ports/out/$name-$version.tar.gz
|
||||
|
||||
find -type f | sed 's|^./||' > /tmp/after.list
|
||||
|
||||
|
@ -16,4 +16,3 @@ fi
|
||||
|
||||
rm -v $(cat $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files)
|
||||
rm -v $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files
|
||||
rm -v $LUNA_ROOT/ports/local/$PORT_NAME-*.tar.gz
|
||||
|
Loading…
Reference in New Issue
Block a user