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
Nurlan
eepm
Commits
9b1f1725
Commit
9b1f1725
authored
Sep 09, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-query-file: cleanup, print all symlinks chain
parent
ef97bf20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
epm-query_file
bin/epm-query_file
+10
-15
No files found.
bin/epm-query_file
View file @
9b1f1725
...
@@ -43,25 +43,24 @@ __do_query_real_file()
...
@@ -43,25 +43,24 @@ __do_query_real_file()
else
else
TOFILE
=
$(
which
--
"
$1
"
2>/dev/null
||
echo
"
$1
"
)
TOFILE
=
$(
which
--
"
$1
"
2>/dev/null
||
echo
"
$1
"
)
if
[
"
$TOFILE
"
!=
"
$1
"
]
;
then
if
[
"
$TOFILE
"
!=
"
$1
"
]
;
then
info
"
Note:
$1
is placed as
$TOFILE
"
info
"
>
$1
is placed as
$TOFILE
"
fi
fi
fi
fi
# get value of symbolic link
if
[
-L
"
$TOFILE
"
]
;
then
local
LINKTO
if
[
-n
"
$short
"
]
;
then
if
[
-n
"
$short
"
]
;
then
__do_short_query
"
$TOFILE
"
__do_short_query
"
$TOFILE
"
else
else
__do_query
"
$TOFILE
"
__do_query
"
$TOFILE
"
fi
fi
LINKTO
=
$(
readlink
-f
--
"
$TOFILE
"
)
info
"Note:
$TOFILE
is link to
$LINKTO
"
# get value of symbolic link
if
[
-L
"
$TOFILE
"
]
;
then
local
LINKTO
LINKTO
=
$(
readlink
--
"
$TOFILE
"
)
info
" >
$TOFILE
is link to
$LINKTO
"
__do_query_real_file
"
$LINKTO
"
__do_query_real_file
"
$LINKTO
"
return
return
fi
fi
FULLFILEPATH
=
"
$TOFILE
"
}
}
dpkg_print_name_version
()
dpkg_print_name_version
()
...
@@ -170,14 +169,10 @@ epm_query_file()
...
@@ -170,14 +169,10 @@ epm_query_file()
res
=
0
res
=
0
for
pkg
in
$pkg_filenames
;
do
for
pkg
in
$pkg_filenames
;
do
__do_query_real_file
"
$pkg
"
__do_query_real_file
"
$pkg
"
||
res
=
$?
if
[
-n
"
$short
"
]
;
then
__do_short_query
"
$FULLFILEPATH
"
||
res
=
$?
else
__do_query
"
$FULLFILEPATH
"
||
res
=
$?
fi
done
done
[
"
$res
"
=
"0"
]
||
info
"Try epm sf for search file in all packages in repository"
[
"
$res
"
=
"0"
]
||
info
"Try epm sf for search file in all packages of the repositories"
#|| pkg_filenames="$FULLFILEPATH" epm_search_file
#|| pkg_filenames="$FULLFILEPATH" epm_search_file
return
$res
return
$res
}
}
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