This file is indexed.

/usr/include/x86_64-linux-gnu/zypp/Target.h is in libzypp-dev 14.29.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/*---------------------------------------------------------------------\
|                          ____ _   __ __ ___                          |
|                         |__  / \ / / . \ . \                         |
|                           / / \ V /|  _/  _/                         |
|                          / /__ | | | | | |                           |
|                         /_____||_| |_| |_|                           |
|                                                                      |
\---------------------------------------------------------------------*/
/** \file zypp/Target.h
 *
*/
#ifndef ZYPP_TARGET_H
#define ZYPP_TARGET_H

#include <iosfwd>

#include "zypp/base/ReferenceCounted.h"
#include "zypp/base/NonCopyable.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/APIConfig.h"

#include "zypp/Product.h"
#include "zypp/Pathname.h"
#include "zypp/ResPool.h"

///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
  namespace target
  {
    class TargetImpl;
    namespace rpm {
      class RpmDb;
    }
  }
  namespace zypp_detail
  {
    class ZYppImpl;
  }

  DEFINE_PTR_TYPE(Target);

  ///////////////////////////////////////////////////////////////////
  //
  //	CLASS NAME : Target
  //
  /**
  */
  class Target : public base::ReferenceCounted, public base::NonCopyable
  {
  public:
    typedef target::TargetImpl  Impl;
    typedef intrusive_ptr<Impl> Impl_Ptr;
    typedef std::list<PoolItem> PoolItemList;

  public:

    /**
     * builds or refreshes the target cache
     */
    void buildCache();

    /**
     * cleans the target cache (.solv files)
     */
    void cleanCache();

   /**
     * load resolvables into the pool
     */
    void load();

    void reload();
    
    /**
     * unload target resolvables from the
     * pool
     */
    void unload();

    /** Null implementation */
    static Target_Ptr nullimpl();

    /** Refference to the RPM database */
    target::rpm::RpmDb & rpmDb();

    /** If the package is installed and provides the file
     Needed to evaluate split provides during Resolver::Upgrade() */
    bool providesFile (const std::string & name_str, const std::string & path_str) const;

    /** Return name of package owning \a path_str
     * or empty string if no installed package owns \a path_str.
     **/
    std::string whoOwnsFile (const std::string & path_str) const;

    /** Return the root set for this target */
    Pathname root() const;

    /** Return the path prefixed by the target root, unless it already is prefixed. */
    Pathname assertRootPrefix( const Pathname & path_r ) const
    { return Pathname::assertprefix( root(), path_r ); }

    /** return the last modification date of the target */
    Date timestamp() const;

    /**
     * returns the target base installed product, also known as
     * the distribution or platform.
     *
     * returns 0 if there is no base installed product in the
     * pool.
     *
     * \note this method requires the target to be loaded,
     * otherwise it will return 0 as no product is found.
     *
     * if you require some base product attributes when the
     * target is not loaded into the pool, see
     * \ref targetDistribution , \ref targetDistributionRelease
     * and \ref distributionVersion that obtain the data
     * on demand from the installed product information.
     */
    Product::constPtr baseProduct() const;

    /**
     * \brief Languages to be supported by the system.
     * E.g. language specific packages to be installed.
     */
    LocaleSet requestedLocales() const;
    /** \overload Use a specific root_r, if empty the default targets root, or '/'
     */
    static LocaleSet requestedLocales( const Pathname & root_r );

  public:
    /** \name Base product and registration.
     *
     * Static methods herein allow to retrieve the values without explicitly
     * initializing the \ref Target. They take a targets root directory as
     * argument. If an empty \ref Pathname is passed, an already existing
     * Targets root is used, otherwise \c "/" is assumed.
     */
    //@{
    /** This is \c register.target attribute of the installed base product.
     * Used for registration and \ref Service refresh.
     */
    std::string targetDistribution() const;
    /** \overload */
    static std::string targetDistribution( const Pathname & root_r );

    /** This is \c register.release attribute of the installed base product.
     * Used for registration.
     */
    std::string targetDistributionRelease() const;
    /** \overload */
    static std::string targetDistributionRelease( const Pathname & root_r );

    struct DistributionLabel { std::string shortName; std::string summary; };
    /** This is \c shortName and \c summary attribute of the installed base product.
     * Used e.g. for the bootloader menu.
     */
    DistributionLabel distributionLabel() const;
    /** \overload */
    static DistributionLabel distributionLabel( const Pathname & root_r );

    /** This is \c version attribute of the installed base product.
     * For example http://download.opensue.org/update/11.0
     * The 11.0 corresponds to the base product version.
     */
    std::string distributionVersion() const;
    /** \overload */
    static std::string distributionVersion( const Pathname & root_r );

    /**
     * This is \c flavor attribute of the installed base product
     * but does not require the target to be loaded as it remembers
     * the last used one. It can be empty is the target has never
     * been loaded, as the value is not present in the system
     * but computer from a package provides
     */
    std::string distributionFlavor() const;
    /** \overload */
    static std::string distributionFlavor( const Pathname & root_r );

    /**
     * anonymous unique id
     *
     * This id is generated once and stays in the
     * saved in the target.
     * It is unique and is used only for statistics.
     *
     */
    std::string anonymousUniqueId() const;
    /** \overload */
    static std::string anonymousUniqueId( const Pathname & root_r );
    //@}

  public:
    /** Ctor. If \c doRebuild_r is \c true, an already existing
     * database is rebuilt (rpm --rebuilddb ).
    */
    explicit
    Target( const Pathname & root = "/", bool doRebuild_r = false );
    /** Ctor */
    explicit
    Target( const Impl_Ptr & impl_r );

  private:
    friend std::ostream & operator<<( std::ostream & str, const Target & obj );
    /** Stream output. */
    std::ostream & dumpOn( std::ostream & str ) const;

  private:
    /** Direct access to Impl. */
    friend class zypp_detail::ZYppImpl;

    /** Pointer to implementation */
    RW_pointer<Impl,rw_pointer::Intrusive<Impl> > _pimpl;

    static Target_Ptr _nullimpl;
  };
  ///////////////////////////////////////////////////////////////////

  /** \relates Target Stream output. */
  inline std::ostream & operator<<( std::ostream & str, const Target & obj )
  { return obj.dumpOn( str ); }

  /** \relates Target::DistributionLabel Stream output.
   * Write out the content as key/value pairs:
   * \code
   * summary=Beautiful Name
   * shortName=BN
   * \endcode
   */
  std::ostream & operator<<( std::ostream & str, const Target::DistributionLabel & obj );

  /////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
#endif // ZYPP_TARGET_H