Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
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
Ximper Linux
mkimage-profiles
Commits
d0bc4229
You need to sign in or sign up before continuing.
Commit
d0bc4229
authored
Aug 20, 2021
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bin/check-pkg-list: only output a list of unavailable packages to build.log
parent
94e25d0c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
check-pkg-list
bin/check-pkg-list
+8
-7
No files found.
bin/check-pkg-list
View file @
d0bc4229
...
...
@@ -16,7 +16,7 @@ debug() { [ -n "$GLOBAL_VERBOSE" ] && echo `basename $0`: $* >&2; }
exit_handler
()
{
local
rc
=
$?
trap
- EXIT
rm
-f
--
"
$ftemp
"
"
$fpkgnames
"
"
$fpkgwildcards
"
"
$favaillist
"
rm
-f
--
"
$ftemp
"
"
$fpkgnames
"
"
$fpkgwildcards
"
"
$favaillist
"
"
$fpkgerrors
"
exit
$rc
}
...
...
@@ -28,7 +28,6 @@ dump_pkgnames() {
check_pkglist
()
{
fprofilelist
=
"
$1
"
[
-f
"
$fprofilelist
"
]
||
error
"invalid packagelist filename:
$fprofilelist
"
[
-n
"
$MULTI
"
]
&&
echo
"--
$fprofilelist
"
debug
"checking
$fprofilelist
against
$favaillist
"
# cleaning pkg list from comments, empty lines,
...
...
@@ -45,15 +44,19 @@ check_pkglist() {
# return unavailable packages
debug
"unavailable packagenames, if any:"
comm
-23
"
$fpkgnames
"
"
$favaillist
"
comm
-23
"
$fpkgnames
"
"
$favaillist
"
>
"
$fpkgerrors
"
# return unavailable wildcards
debug
"unavailable wildcards, if any:"
while
read
i
;
do
# replacing * with regexp's \.+
pattern
=
"^
`
echo
${
i
#^
}
|
sed
-e
's/\*/.\\\\+/'
`
$"
grep
-q
"
$pattern
"
"
$favaillist
"
||
echo
"
$i
"
grep
-q
"
$pattern
"
"
$favaillist
"
||
echo
"
$i
"
>>
"
$fpkgerrors
"
done
<
"
$fpkgwildcards
"
if
[
-s
"
$fpkgerrors
"
]
;
then
echo
"Error: Packages are not available in
$fprofilelist
:"
>
&2
cat
$fpkgerrors
>
&2
fi
}
[
"$#"
-gt
0
]
||
error
"need at least one argument, a packagelist to check"
...
...
@@ -64,6 +67,7 @@ trap exit_handler HUP INT QUIT TERM EXIT
favaillist
=
"
`
mktemp
$TEMP
/pkgchecker.avail.XXXXX
`
"
fpkgnames
=
"
`
mktemp
$TEMP
/pkgchecker.names.XXXXX
`
"
fpkgwildcards
=
"
`
mktemp
$TEMP
/pkgchecker.wildcards.XXXXX
`
"
fpkgerrors
=
"
`
mktemp
$TEMP
/pkgchecker.error.XXXXX
`
"
ftemp
=
"
`
mktemp
$TEMP
/pkgchecker.XXXXX
`
"
# check args
...
...
@@ -91,9 +95,6 @@ done
[
-s
"
$favaillist
"
]
||
dump_pkgnames
# now on to the real job; Q: skip *.in or not?
[
"$#"
-eq
1
]
&&
MULTI
=
||
MULTI
=
1
for
list
in
"
$@
"
;
do
check_pkglist
"
$list
"
done
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