Commit 55a1fdde authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.61.0

parent dd8e21ba
...@@ -34,7 +34,7 @@ SHAREDIR=$PROGDIR ...@@ -34,7 +34,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.60.13" EPMVERSION="3.61.0"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -246,6 +246,11 @@ rhas() ...@@ -246,6 +246,11 @@ rhas()
echo "$1" | grep -E -q -- "$2" echo "$1" | grep -E -q -- "$2"
} }
rihas()
{
echo "$1" | grep -E -i -q -- "$2"
}
startwith() startwith()
{ {
# rhas "$1" "^$2" # rhas "$1" "^$2"
...@@ -783,7 +788,7 @@ get_package_type() ...@@ -783,7 +788,7 @@ get_package_type()
echo "msi" echo "msi"
return return
;; ;;
*.AppImage) *.AppImage|*.appimage)
echo "AppImage" echo "AppImage"
return return
;; ;;
...@@ -5861,7 +5866,10 @@ epm_pack() ...@@ -5861,7 +5866,10 @@ epm_pack()
url="$tarname" url="$tarname"
pkg_urls="$tarname" pkg_urls="$tarname"
cd $tmpdir || fatal cd $tmpdir || fatal
__handle_pkg_urls_to_install
__download_pkg_urls
pkg_urls=
[ -n "$pkg_files" ] || fatal "Can't download $tarname" [ -n "$pkg_files" ] || fatal "Can't download $tarname"
tarname="$(realpath "$pkg_files")" tarname="$(realpath "$pkg_files")"
elif [ -d "$tarname" ] ; then elif [ -d "$tarname" ] ; then
...@@ -8435,6 +8443,10 @@ epm_release_upgrade() ...@@ -8435,6 +8443,10 @@ epm_release_upgrade()
sudocmd urpmi --auto-update $non_interactive $force sudocmd urpmi --auto-update $non_interactive $force
return return
;; ;;
"OpenMandrivaLx")
sudocmd dnf clean all
sudocmd dnf --allowerasing distro-sync
return
"ROSA") "ROSA")
# TODO: move to distro related upgrade # TODO: move to distro related upgrade
#epm repo remove all #epm repo remove all
...@@ -8901,8 +8913,10 @@ epm_remove() ...@@ -8901,8 +8913,10 @@ epm_remove()
[ -n "$force" ] || return $STATUS [ -n "$force" ] || return $STATUS
fi fi
# TODO: FIX
# нужно удалить все пакеты, которые зависят от удаляемого
if [ -n "$noscripts" ] ; then if [ -n "$noscripts" ] ; then
warning "It is not recommended to remove a few packages with disabled scripts simultaneously." #warning "It is not recommended to remove a few packages with disabled scripts simultaneously."
fatal "We can't allow packages removing on hi level when --noscripts is used." fatal "We can't allow packages removing on hi level when --noscripts is used."
fi fi
...@@ -9201,8 +9215,10 @@ __prepare_source_package() ...@@ -9201,8 +9215,10 @@ __prepare_source_package()
# TODO: use func for get name from deb pkg # TODO: use func for get name from deb pkg
# TODO: epm print name from deb package # TODO: epm print name from deb package
local pkgname="$(echo $alpkg | sed -e "s|_.*||")"
# TODO: use stoplist only for deb? # TODO: use stoplist only for deb?
[ -z "$force" ] && __check_stoplist $(echo $alpkg | sed -e "s|_.*||") && fatal "Please use official package instead of $alpkg repacking (It is not recommended to use --force to skip this checking." [ -z "$force" ] && __check_stoplist $pkgname && fatal "Please use official package instead of $alpkg repacking (It is not recommended to use --force to skip this checking."
SUBGENERIC='' SUBGENERIC=''
...@@ -9214,7 +9230,7 @@ __prepare_source_package() ...@@ -9214,7 +9230,7 @@ __prepare_source_package()
# convert tarballs to tar (for alien) # convert tarballs to tar (for alien)
# they will fill $returntarname # they will fill $returntarname
if rhas "$alpkg" "\.AppImage$" ; then if rihas "$alpkg" "\.AppImage$" ; then
# big hack with $pkg_urls_downloaded (it can be a list, not a single url) # big hack with $pkg_urls_downloaded (it can be a list, not a single url)
__epm_pack_run_handler generic-appimage "$pkg" "" "$pkg_urls_downloaded" __epm_pack_run_handler generic-appimage "$pkg" "" "$pkg_urls_downloaded"
SUBGENERIC='appimage' SUBGENERIC='appimage'
...@@ -9288,7 +9304,8 @@ epm_repack() ...@@ -9288,7 +9304,8 @@ epm_repack()
{ {
# if possible, it will put pkg_urls into pkg_files and reconstruct pkg_filenames # if possible, it will put pkg_urls into pkg_files and reconstruct pkg_filenames
if [ -n "$pkg_urls" ] ; then if [ -n "$pkg_urls" ] ; then
__handle_pkg_urls_to_install __download_pkg_urls
pkg_urls=
fi fi
[ -n "$pkg_names" ] && warning "Can't find $pkg_names files" [ -n "$pkg_names" ] && warning "Can't find $pkg_names files"
...@@ -9558,6 +9575,8 @@ __epm_repack_to_rpm() ...@@ -9558,6 +9575,8 @@ __epm_repack_to_rpm()
# run generic scripts and repack script for the pkg # run generic scripts and repack script for the pkg
cd $buildroot || fatal cd $buildroot || fatal
[ -n "$EEPM_INTERNAL_PKGNAME" ] && [ "$EEPM_INTERNAL_PKGNAME" != "$pkgname" ] && fatal "Some bug: the name of the repacking package ($pkgname) differs with the package name ($EEPM_INTERNAL_PKGNAME) from play.d script."
__fix_spec $pkgname $buildroot $spec __fix_spec $pkgname $buildroot $spec
__apply_fix_code "generic" $buildroot $spec $pkgname $abspkg $SUBGENERIC __apply_fix_code "generic" $buildroot $spec $pkgname $abspkg $SUBGENERIC
__apply_fix_code "generic-$SUBGENERIC" $buildroot $spec $pkgname $abspkg __apply_fix_code "generic-$SUBGENERIC" $buildroot $spec $pkgname $abspkg
...@@ -9565,6 +9584,7 @@ __epm_repack_to_rpm() ...@@ -9565,6 +9584,7 @@ __epm_repack_to_rpm()
if ! has_repack_script $pkgname ; then if ! has_repack_script $pkgname ; then
__apply_fix_code "generic-default" $buildroot $spec $pkgname $abspkg __apply_fix_code "generic-default" $buildroot $spec $pkgname $abspkg
fi fi
__fix_spec $pkgname $buildroot $spec
cd - >/dev/null cd - >/dev/null
TARGETARCH=$(epm print info -a | sed -e 's|^x86$|i586|') TARGETARCH=$(epm print info -a | sed -e 's|^x86$|i586|')
...@@ -11944,9 +11964,12 @@ rsync_alt_contents_index() ...@@ -11944,9 +11964,12 @@ rsync_alt_contents_index()
local URL="$1" local URL="$1"
local TD="$2" local TD="$2"
local res local res
assure_exists rsync assure_exists rsync || return
__rsync_check "$URL" || return if ! __rsync_check "$URL" ; then
warning "$URL is not accessible via rsync, skipping contents index update..."
return
fi
mkdir -p "$(dirname "$TD")" mkdir -p "$(dirname "$TD")"
...@@ -12892,7 +12915,7 @@ esac ...@@ -12892,7 +12915,7 @@ esac
__epm_update() __epm_update()
{ {
[ -z "$*" ] || fatal "No arguments are allowed here" [ -z "$*" ] || fatal "No arguments are allowed for epm update command"
info "Running update the package index files from remote package repository database ..." info "Running update the package index files from remote package repository database ..."
...@@ -15851,7 +15874,7 @@ get_urls() ...@@ -15851,7 +15874,7 @@ get_urls()
# cat html, divide to lines by tags and cut off hrefs only # cat html, divide to lines by tags and cut off hrefs only
scat $URL | sed -e 's|<|<\n|g' -e 's|data-file=|href=|g' -e "s|href=http|href=\"http|g" -e "s|>|\">|g" -e "s|'|\"|g" | \ scat $URL | sed -e 's|<|<\n|g' -e 's|data-file=|href=|g' -e "s|href=http|href=\"http|g" -e "s|>|\">|g" -e "s|'|\"|g" | \
grep -i -o -E 'href="(.+)"' | cut -d'"' -f2 grep -i -o -E 'href="(.+)"' | sed -e 's|&amp;|\&|' | cut -d'"' -f2
} }
...@@ -15926,8 +15949,8 @@ else ...@@ -15926,8 +15949,8 @@ else
fi fi
# https://www.freeoffice.com/download.php?filename=freeoffice-2021-1062.x86_64.rpm # https://www.freeoffice.com/download.php?filename=freeoffice-2021-1062.x86_64.rpm
if echo "$URL" | grep -q "[*]" ; then if echo "$URL" | grep -q "[*\[\]]" ; then
fatal "Error: there are globbing symbol (*) in $URL. It is allowed only for mask part" fatal "Error: there are globbing symbol (*[]) in $URL. It is allowed only for mask part"
fi fi
is_url "$MASK" && fatal "eget supports only one URL as argument" is_url "$MASK" && fatal "eget supports only one URL as argument"
...@@ -15950,8 +15973,15 @@ if [ -n "$LISTONLY" ] ; then ...@@ -15950,8 +15973,15 @@ if [ -n "$LISTONLY" ] ; then
return return
fi fi
is_wildcard()
{
echo "$1" | grep -q "[*?]" && return
echo "$1" | grep -q "\]" && return
echo "$1" | grep -q "\[" && return
}
# If there is no wildcard symbol like asterisk, just download # If there is no wildcard symbol like asterisk, just download
if echo "$MASK" | grep -qv "[*?]" || echo "$MASK" | grep -q "[?].*="; then if ! is_wildcard "$MASK" || echo "$MASK" | grep -q "[?].*="; then
sget "$1" "$TARGETFILE" sget "$1" "$TARGETFILE"
return return
fi fi
......
...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR ...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.60.13" EPMVERSION="3.61.0"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -246,6 +246,11 @@ rhas() ...@@ -246,6 +246,11 @@ rhas()
echo "$1" | grep -E -q -- "$2" echo "$1" | grep -E -q -- "$2"
} }
rihas()
{
echo "$1" | grep -E -i -q -- "$2"
}
startwith() startwith()
{ {
# rhas "$1" "^$2" # rhas "$1" "^$2"
...@@ -783,7 +788,7 @@ get_package_type() ...@@ -783,7 +788,7 @@ get_package_type()
echo "msi" echo "msi"
return return
;; ;;
*.AppImage) *.AppImage|*.appimage)
echo "AppImage" echo "AppImage"
return return
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment