Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
a9da859b
Commit
a9da859b
authored
Mar 27, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm repo index/add: improvements
parent
d306b611
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
9 deletions
+34
-9
epm-addrepo
bin/epm-addrepo
+12
-2
epm-repoindex
bin/epm-repoindex
+22
-7
No files found.
bin/epm-addrepo
View file @
a9da859b
...
@@ -73,12 +73,22 @@ __epm_addrepo_etersoft_addon()
...
@@ -73,12 +73,22 @@ __epm_addrepo_etersoft_addon()
fi
fi
}
}
get_archlist
()
{
echo
"noarch"
echo
"
$DISTRARCH
"
case
$DISTRARCH
in
x86_64
)
echo
"i586"
;;
esac
}
__epm_addrepo_altlinux_dir
()
__epm_addrepo_altlinux_dir
()
{
{
local
archlist
=
"i586 x86_64 aarch64 noarch"
local dir
=
"
$1
"
local dir
=
"
$1
"
local arch
local arch
for
arch
in
$
archlist
;
do
for
arch
in
$
(
get_archlist
)
;
do
local
rd
=
"
$(
echo
$dir
/
$arch
/RPMS.
*)
"
local
rd
=
"
$(
echo
$dir
/
$arch
/RPMS.
*)
"
[
-d
"
$rd
"
]
||
continue
[
-d
"
$rd
"
]
||
continue
local
REPO_NAME
=
"
$(
echo
"
$rd
"
|
sed
-e
's|.*\.||'
)
"
local
REPO_NAME
=
"
$(
echo
"
$rd
"
|
sed
-e
's|.*\.||'
)
"
...
...
bin/epm-repoindex
View file @
a9da859b
...
@@ -19,6 +19,18 @@
...
@@ -19,6 +19,18 @@
load_helper epm-sh-altlinux
load_helper epm-sh-altlinux
# copied from epm-addrepo
get_archlist
()
{
echo
"noarch"
echo
"
$DISTRARCH
"
case
$DISTRARCH
in
x86_64
)
echo
"i586"
;;
esac
}
# https://www.altlinux.org/APT_%D0%B2_ALT_Linux/CreateRepository
# https://www.altlinux.org/APT_%D0%B2_ALT_Linux/CreateRepository
__epm_repoindex_alt
()
__epm_repoindex_alt
()
{
{
...
@@ -30,7 +42,7 @@ __epm_repoindex_alt()
...
@@ -30,7 +42,7 @@ __epm_repoindex_alt()
shift
shift
fi
fi
epm assure genbasedir apt-repo-tools
epm assure genbasedir apt-repo-tools
||
fatal
REPO_DIR
=
"
$1
"
REPO_DIR
=
"
$1
"
# TODO: check if we inside arch dir or RPMS.*
# TODO: check if we inside arch dir or RPMS.*
[
-n
"
$REPO_DIR
"
]
||
REPO_DIR
=
"
$(
pwd
)
"
[
-n
"
$REPO_DIR
"
]
||
REPO_DIR
=
"
$(
pwd
)
"
...
@@ -39,7 +51,7 @@ __epm_repoindex_alt()
...
@@ -39,7 +51,7 @@ __epm_repoindex_alt()
if
[
-z
"
$REPO_NAME
"
]
;
then
if
[
-z
"
$REPO_NAME
"
]
;
then
# default name
# default name
REPO_NAME
=
"addon"
REPO_NAME
=
"addon"
# detect if already exists
# detect
name
if already exists
for
arch
in
$archlist
;
do
for
arch
in
$archlist
;
do
local
rd
=
"
$(
echo
$REPO_DIR
/
$arch
/RPMS.
*)
"
local
rd
=
"
$(
echo
$REPO_DIR
/
$arch
/RPMS.
*)
"
[
-d
"
$rd
"
]
&&
REPO_NAME
=
"
$(
echo
"
$rd
"
|
sed
-e
's|.*\.||'
)
"
&&
break
[
-d
"
$rd
"
]
&&
REPO_NAME
=
"
$(
echo
"
$rd
"
|
sed
-e
's|.*\.||'
)
"
&&
break
...
@@ -47,15 +59,16 @@ __epm_repoindex_alt()
...
@@ -47,15 +59,16 @@ __epm_repoindex_alt()
fi
fi
if
[
-n
"
$init
"
]
;
then
if
[
-n
"
$init
"
]
;
then
for
arch
in
$archlist
;
do
for
arch
in
$(
get_archlist
)
;
do
mkdir
-pv
"
$REPO_DIR
/
$arch
/base/"
"
$REPO_DIR
/
$arch
/RPMS.
$REPO_NAME
"
mkdir
-pv
"
$REPO_DIR
/
$arch
/base/"
mkdir
-pv
"
$REPO_DIR
/
$arch
/RPMS.
$REPO_NAME
/"
done
done
return
return
fi
fi
for
arch
in
$archlist
;
do
for
arch
in
$archlist
;
do
mkdir
-pv
"
$REPO_DIR
/
$arch
/base/"
[
-d
"
$REPO_DIR
/
$arch
/RPMS.
$REPO_NAME
"
]
||
continue
[
-d
"
$REPO_DIR
/
$arch
/RPMS.
$REPO_NAME
"
]
||
continue
mkdir
-pv
"
$REPO_DIR
/
$arch
/base/"
sudocmd genbasedir
--bloat
--progress
--topdir
=
$REPO_DIR
$arch
$REPO_NAME
sudocmd genbasedir
--bloat
--progress
--topdir
=
$REPO_DIR
$arch
$REPO_NAME
done
done
}
}
...
@@ -91,8 +104,10 @@ case $PMTYPE in
...
@@ -91,8 +104,10 @@ case $PMTYPE in
sudocmd verifytree
sudocmd verifytree
;;
;;
dnf-rpm
)
dnf-rpm
)
docmd dnf repolist
$verbose
epm
install
--skip-installed
yum-utils createrepo
||
fatal
[
-n
"
$verbose
"
]
||
info
"Use --verbose if you need detail information."
sudocmd
mkdir
-pv
"
$@
"
sudocmd createrepo
-v
-s
md5
"
$@
"
sudocmd verifytree
;;
;;
eoget
)
eoget
)
docmd eoget index
"
$@
"
docmd eoget index
"
$@
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment