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
ca5d65c6
Commit
ca5d65c6
authored
Nov 26, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce is_installed and use it instead epm_query internally
parent
d7544747
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
10 deletions
+15
-10
epm-changelog
bin/epm-changelog
+1
-1
epm-filelist
bin/epm-filelist
+2
-2
epm-info
bin/epm-info
+2
-2
epm-install
bin/epm-install
+1
-1
epm-query
bin/epm-query
+9
-4
No files found.
bin/epm-changelog
View file @
ca5d65c6
...
...
@@ -99,7 +99,7 @@ epm_changelog()
local
pkg
for
pkg
in
$pkg_names
;
do
if
pkg_names
=
$pkg
epm_query
;
then
if
is_installed
$pkg
;
then
__epm_changelog_local_names
$pkg
else
__epm_changelog_unlocal_names
$pkg
...
...
bin/epm-filelist
View file @
ca5d65c6
...
...
@@ -67,7 +67,7 @@ __epm_filelist_name()
CMD
=
"pacman -Ql"
;;
slackpkg
)
epm_query
>
/dev/null
||
fatal
"Query filelist for non installed packages does not realized"
is_installed
$pkg_names
||
fatal
"Query filelist for non installed packages does not realized"
docmd
awk
'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}'
/var/log/packages/
${
pkg_filenames
}*
return
;;
...
...
@@ -77,7 +77,7 @@ __epm_filelist_name()
esac
docmd
$CMD
$pkg_names
&&
return
epm_query
>
/dev/null
||
fatal
"Query filelist for non installed packages does not realized"
is_installed
$pkg_names
||
fatal
"Query filelist for non installed packages does not realized"
}
...
...
bin/epm-info
View file @
ca5d65c6
...
...
@@ -26,7 +26,7 @@ __epm_info_rpm_low()
docmd rpm
-qip
$pkg_files
fi
[
-z
"
$pkg_names
"
]
&&
return
pkg_filenames
=
$pkg_names
epm_query
>
/dev/null
&&
docmd rpm
-qi
$pkg_names
&&
return
is_installed
$pkg_names
&&
docmd rpm
-qi
$pkg_names
&&
return
}
epm_info
()
...
...
@@ -41,7 +41,7 @@ case $PMTYPE in
docmd dpkg
-I
$pkg_files
fi
[
-z
"
$pkg_names
"
]
&&
return
pkg_filenames
=
$pkg_names
epm_query
>
/dev/null
&&
docmd dpkg
-p
$pkg_names
&&
return
is_installed
$pkg_names
&&
docmd dpkg
-p
$pkg_names
&&
return
docmd apt-cache show
$pkg_names
;;
yum-rpm
)
...
...
bin/epm-install
View file @
ca5d65c6
...
...
@@ -23,7 +23,7 @@ filter_out_installed_packages()
{
[
-z
"
$skip_installed
"
]
&&
cat
&&
return
# TODO: rewrite with use
epm_query
# TODO: rewrite with use
is_installed
# TODO: use this more effectively way
#for i in $(cat) ; do
# rpm -q $i >/dev/null && continue
...
...
bin/epm-query
View file @
ca5d65c6
...
...
@@ -56,7 +56,7 @@ __epm_query_file()
;;
esac
docmd
$CMD
$
pkg_files
docmd
$CMD
$
@
}
__epm_query_name
()
...
...
@@ -77,17 +77,22 @@ __epm_query_name()
#return
;;
npackd
)
CMD
=
"npackdcl path --package=
$
pkg_names
"
CMD
=
"npackdcl path --package=
$
@
"
;;
*
)
_query_via_packages_list
$
pkg_names
_query_via_packages_list
$
@
return
;;
esac
docmd
$CMD
$
pkg_names
docmd
$CMD
$
@
}
# check if pkg is installed
is_installed
()
{
pkg_filenames
=
"
$@
"
epm_query
>
/dev/null
}
epm_query
()
{
...
...
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